package com.wey.thread;


import lombok.extern.slf4j.Slf4j;

@Slf4j
public class TestObject extends Thread{

    private static int i = 0;

    public int getI() {
        return i;
    }

    @Override
    public void run() {
       while (i < 10) {
           i++;
           log.info("i=" + i);
           System.out.println(Thread.currentThread().getName() + ":" + i);
        }
    }
}
